Converts a numeric expression into a string.
数値表式を文字列に変換します。
Str (Expression)
Str (Expression)
String
文字列
Expression: Any numeric expression.
Expression:任意の数値表式。
The Str function converts a numeric variable, or the result of a calculation into a string. Negative numbers are preceded by a minus sign. Positive numbers are preceded by a space (instead of the plus sign).
Str 関数は、数値変数および数値演算の結果を、文字列に変換します。負の値にはマイナス記号が付きます。正の値にはスペース記号が付きます (プラス記号は付きません)。
Sub ExampleStr
Sub ExampleStr
Dim iVar As Single
Dim iVar As Single
Dim sVar As String
Dim sVar As String
iVar = 123.123
iVar = 123.123
sVar = LTrim(Str(iVar))
sVar = LTrim(Str(iVar))
Msgbox sVar & chr(13) & Str(iVar)
Msgbox sVar & chr(13) & Str(iVar)
end sub
end sub